#include <iostream>
#include <typeinfo>
using namespace std;

template<typename T>
class A{
public:
  T t;
  A(){cout<<"primary template\t"<<typeid(T).name()<<endl;}
};

template<typename T>
class A<T*>{
public:
  T *t;
  A(){cout<<"partial specialization unconst\t"<<typeid(T).name()<<endl;}
};

template<typename T>
class A<const T*>{
public:
  T *t;
  A(){cout<<"partial specialization const\t"<<typeid(T).name()<<endl;}
};

template<>
class A<int*>{
public:
  int* pi;
  A(){cout<<"complete specialization\t"<<"int*"<<endl;}
};

template<>
class A<double*>{
public:
  double* pd;
  A(){cout<<"complete specialization\t"<<"double*"<<endl;}
};

int main()
{
  A<int> ai;
  A<char*>apc;
  A<const char*> apcc;

  A<int*> api;
  A<double*> apd;
  return 0;
}
